#ifndef __PARSER_H__
#define __PARSER_H__

#include <string.h>



namespace so
{
    bool strbegin(const char* beg, const char* str);
    bool strend(const char* hay, const char* str);
    const char* strstr(const char* beg, const char* str);
    const char* stristr(const char* beg, const char* str);
    char *strnew(const char *psz);
    bool isdigit(char c);
    void strlower(char* a);
    int chartohex (char c) ;
    bool is_alnum(const char c);
    void   trimrightsp(char* s);
    char* strlastchr(char* s, char p);
    char* strprevchr(char* s, char p);
    char* strprevchr(char* start, char* s, char p);
    char* str_chr(char* s, char p);
    int   str_count(const char* s, char p);
    void   trimcrlf(char* s);
    char* strnchr(char* s, char p, int pos);
    char* strcpy(char* d, char* s, int destsz=0);
    const char* strccpy(char* d, const char* s, char occ);
    char* strscpy(char* d, char* s, const char* occ);
    char* strskipalnum(char *s) ;
    bool  strcat(char* d, char* s, int szl);
    void  keep_alphanum(char* p);
    void  format_ascii(char* p);
    char* trimfront(char* p);
    void  trimall(char* p, char c);
    void  trimright(char* p, char c);
    void  trimnonsql(char* p);
    void  trimeol(char* p);
    void   manglename(char* file);
    void strupper(char* a);
    int  str_findlast(const char* a, char chr);
	void replace_urlfmt(char*);

};


#endif //
